package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.onekey.CtrlOneKeyOnlineService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.CtrlOneKeyOnlineRequest;
import com.tuanzi.loan.vo.response.family.CtrlOneKeyOnlineResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-07-12 15:20
 */
public class CtrlOneKeyOnlineLazyDataModel extends LazyDataSessionModel<CtrlOneKeyOnlineRequest,CtrlOneKeyOnlineResponse> {

    private CtrlOneKeyOnlineService ctrlOneKeyOnlineService;

    public CtrlOneKeyOnlineLazyDataModel(CtrlOneKeyOnlineRequest ctrlOneKeyOnlineRequest, CurrentUserBean session, CtrlOneKeyOnlineService ctrlOneKeyOnlineService) {
        super(ctrlOneKeyOnlineRequest, session);
        this.ctrlOneKeyOnlineService = ctrlOneKeyOnlineService;
    }

    @Override
    protected Page<CtrlOneKeyOnlineResponse> doLoad0(PageSearcher<CtrlOneKeyOnlineRequest> pageSearcher) {
        return ctrlOneKeyOnlineService.list(pageSearcher);
    }
}